home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Sample Code / SCSI Samples 1.0 / SCSI Async Sample 06⁄15 ƒ / Src / SCSIBusInquiry.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-16  |  704 b   |  33 lines  |  [TEXT/KAHL]

  1. /*                                SCSIBusInquiry.c                                */
  2. /*
  3.  * SCSIBusInquiry.c
  4.  * Copyright © 1992-93 Apple Computer Inc. All Rights Reserved.
  5.  *
  6.  * Get information on a specified host bus adaptor (HBA) incluing the number
  7.  * of HBA's installed.
  8.  *
  9.  * This function will crash if the New SCSI Manager is not installed.
  10.  *
  11.  */
  12. #include "SCSIAsyncSample.h"
  13.  
  14. OSErr
  15. GetHostBusCount(
  16.         short                        *busCount
  17.     )
  18. {
  19.  
  20.         OSErr                        status;
  21.         SCSIBusInquiryPB            busInquiryPB;
  22. #define PB                            (busInquiryPB)
  23.  
  24.         CLEAR(PB);
  25.         PB.scsiPBLength = sizeof PB;
  26.         PB.scsiFunctionCode = SCSIBusInquiry;
  27.         PB.scsiDevice.bus = 0;
  28.         status = SCSIAction((SCSI_PB *) &PB);
  29.         if (status == noErr)
  30.             *busCount = PB.scsiHiBusID;
  31.         return (status);
  32. }        
  33.